/// @Author: DengLibin
/// @Date: Create in 2025-03-19 11:32:19
/// @Description:
///

use derive_builder::Builder;
use proc_macro::table_name;
use proc_macro::GetFieldNames;
use proc_macro::HaveFieldType;
use proc_macro::StructToMap;
use serde::{Deserialize, Serialize};
use sqlx::FromRow;



use my_trait::MustHaveTableName;
use my_trait::MustHaveFieldType;
use my_trait::Struct2Map;

#[derive(Debug, FromRow, Serialize, Deserialize)]
#[derive(Builder, GetFieldNames, StructToMap, HaveFieldType)]

// DROP TABLE article;

// CREATE TABLE `article` (
//   `id` bigint NOT NULL AUTO_INCREMENT,
//   `xuhao` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `meitileixing` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `biaoti` varchar(2048) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `fabumeiti` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `zuozhe` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `fabushijian` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `zhaiyao` text COLLATE utf8mb4_general_ci,
//   `yuanwenlianjie` text COLLATE utf8mb4_general_ci,
//   `qingganqingxiang` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `banquanmeiti` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `zimeitirenzhengzhuangtai` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `weibozhurenzhengleixing` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `weibozhuxingbie` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `weiboipshudi` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `weibozhufensishu` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `meitiICPdiyu` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `zimeitizhanghaomingcheng` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `weixinshifoutoutiao` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `weiboshifouyuanfa` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `meitierjifenlei` varchar(256) COLLATE utf8mb4_general_ci DEFAULT NULL,
//   `content` mediumtext COLLATE utf8mb4_general_ci,
//   PRIMARY KEY (`id`)
// ) ENGINE=InnoDB AUTO_INCREMENT=423 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

#[table_name("article")]
pub struct Article {
    pub id: i64,
    pub xuhao: String,
    pub meitileixing: String,
    pub biaoti: String,
    pub fabumeiti: String,
    pub zuozhe: String,
    pub fabushijian: String,
    pub zhaiyao: String,
    pub yuanwenlianjie: String,
    pub qingganqingxiang: String,
    pub banquanmeiti: String,
    pub zimeitirenzhengzhuangtai: String,
    pub weibozhurenzhengleixing: String,
    pub weibozhuxingbie: String,
    pub weiboipshudi: String,
    pub weibozhufensishu: String,
    pub meitiICPdiyu: String,
    pub zimeitizhanghaomingcheng: String,
    pub weixinshifoutoutiao: String,
    pub weiboshifouyuanfa: String,
    pub meitierjifenlei: String,
    pub content: String, //网页内容
    pub orgs: Option<String>, //机构实体
}
